gusucode.com > 231 - 红色婚纱 html66精品模板 > 231 - 红色婚纱/js/ciads.js
/* *名称: caids.js *日期: 2012-3-08 *功能: 影楼/企业网站浏览器动效程式 *作者: 武汉奕创互动广告有限公司前端架构团队 *版权: 武汉奕创互动广告有限公司(http://www.ciads.net http://www.ciads.com)保留 */ $(function(){ $(".wb_f a.close").click(function(){ $(this).parent().remove(); return false; }); goTop(); $(window).scroll(function(){ goTop(); }); $(".layer2").hover(function(){ $(this).stop().animate({width:193},500); },function(){ $(this).stop().animate({width:34},500); }); $(".b1 ul").tabs(".banner > a", {effect:'fade',fadeOutSpeed:100,rotate:true,current:"on"}); $(".b3 ul").tabs(".pannel > a", {effect:'fade',fadeOutSpeed:100,rotate:true,current:"on"}).slideshow({autoplay:true,autopause:true,interval:6000}); $(".b1").scrollable({size:4,items:".b1 ul",loop:true,prev:".l1",next:".r1"}); $(".b3").scrollable({size:5,items:".b3 ul",loop:true,prev:".l2",next:".r2",vertical:true}); $(".b2").scrollable({size:5,items:".b2 ul",loop:true,vertical:true}).autoscroll({autoplay:true,autopause:true,interval:6000}).navigator({navi:".tab2",naviItem:'li',activeClass:"on"}); $(".bi").scrollable({size:1,items:".bi ul",loop:true}).autoscroll({autoplay:true,autopause:true,interval:6000}); $("ul.nav a").click(function(){ $("ul.nav a").removeClass("hover"); $("ul.nav dl").slideUp(); $(this).toggleClass("hover"); var dl = $(this).parent("li").find("dl"); if(dl.length>0){dl.slideToggle();return false}; }); $(".page a[href]").each(function(){ $(this).attr("href",$(this).attr("href")+"#main"); }); var io=0; $(".b1 li").click(function(){ $(".b1 li").removeClass("on"); $(".b1 li").animate({top:0},100); var i =$(this).index(); $(".tab1 li").eq(i).click(); $(this).addClass("on"); $(this).animate({top:"-0px"},300); }); $(".b1 li:eq(0),.tab1 li:eq(0)").click(); io=1; var rc = setInterval(function(){$(".b1 li:eq("+io+")").click();io++;if(io>=$(".b1 li").length){io=0}},6000000000); $(".b1 li").mousedown(function(){io=$(this).prevAll().length+1}); $(".tab1 li i").fadeOut(); $(".tab1 li").click(function(){ $(this).addClass("on").siblings().removeClass("on"); $(".tab1 li i").fadeOut(); $(this).find("i").fadeIn(); }); $(".tab1 li:eq(0)").click(); $(".dwl a").hover(function(){$(this).find("i").stop().animate({top:"157px"},300)},function(){$(this).find("i").stop().animate({top:"197px"},300)}); $(".rwl a").hover(function(){$(this).find("i").stop().animate({top:"121px"},300)},function(){$(this).find("i").stop().animate({top:"151px"},300)}); $(".dsl a").hover(function(){$(this).css({"z-index":3});$(this).find("div").slideDown();},function(){$(this).css({"z-index":1});$(this).find("div").slideUp();}); $(".flb").click(function(){if($(this).hasClass("on")){$(".flk ul").hide();$(this).removeClass("on")}else{$(".flk ul").show();$(this).addClass("on")}}); $(".rf").click(function(){return false}); $("a.gtop").click(function(){$('html, body').animate({scrollTop:0},800);}); }) function goTop(){ $(".wb_f,.layer2").stop().animate({"top":$(window).scrollTop()+120},1000); }